export default class Utils {

  lastTime = 0;

  time(msg) {
    let current = new Date().getTime();
    if (msg) {
      console.log(msg, current, this.lastTime, `${current - this.lastTime} ms`);
    }
    this.lastTime = current;
  }

  getTestArray(length) {
    let arr=[]
    for (let i = 0; i < length; i++) {
      arr.push(i);
    }
    return arr;
  }
}
export const persons = [];
for (let i = 0; i < 1000000; i++) {
  persons.push({
    id: i
  });
}
export function getPersons(length) {
  let arr = [];
  for (let i = 0; i < length; i++) {
    arr.push({
      id: i
    });
  }
  return arr;
}
